//
//  HNHappyTimeCell.m
//  XDEducation
//
//  Created by 星道 on 17/8/2.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "HNHappyTimeCell.h"

@implementation HNHappyTimeCell
{
    IBOutlet UIImageView *_Img;
    IBOutlet UILabel *_Title;
}

- (void)setModel:(HNHappyTimeModel *)Model
{
    _Model = Model;
    _Title.text = [Model.nickName isKindOfClass:[NSNull class]]? [Model.uid stringValue]:Model.nickName;

    if (![Model.avatar isKindOfClass:[NSNull class]] && Model.avatar)
    {
        [_Img sd_setImageWithURL:[NSURL URLWithString:BaseIconUrl(Model.avatar)] placeholderImage:[UIImage imageNamed:@"mine_bnt_user_default"]];
    }
}

- (void)setQunModel:(HNHappyTimeQunModel *)QunModel
{
    _QunModel = QunModel;
    _Title.text = QunModel.qun_name;
    _Img.image = [UIImage imageNamed:@"mine_bnt_user_default"];
}
@end
